<?php

use yii\helpers\Html;
use yii\grid\GridView;

/* @var $this yii\web\View */
/* @var $searchModel backend\models\AdminLogSearch */
/* @var $dataProvider yii\data\ActiveDataProvider */

$this->title = '操作日志';
$this->params['breadcrumbs'][] = $this->title;
?>
<div class="admin-log-index">
    <?= GridView::widget([
        'dataProvider' => $dataProvider,
        'filterModel' => $searchModel,
        'columns' => [
            ['class' => 'yii\grid\SerialColumn'],

            //'id',
            //'route',
            //'description:ntext',
            [
                'label' => '描述',
                "attribute" => "description",
                "value" => "description",
                'contentOptions' => ['style' => 'white-space: normal;', 'width' => '60%'],
            ],
            //'user_id',
            [
                'label' => '操作人',
                'attribute' => 'user_id',
                'filter' => Html::activeTextInput($searchModel, 'username', ['class' => 'form-control']),
                'value' => 'user.username'
            ],
            'ip',
        ],
    ]); ?>
</div>
